<!DOCTYPE html>
<html lang="en">
<!-- <head>
  <meta charset="UTF-8">
  <title>Document</title>
  <link rel="stylesheet" type="text/css" href="res/static/css/main.css">
  <link rel="stylesheet" type="text/css" href="res/layui/css/layui.css">
  <script type="text/javascript" src="res/layui/layui.js"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
</head> -->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>酒店展示页面</title>
  <meta name="description" content="GARO is a real-estate template">
  <meta name="author" content="Kimarotec">
  <meta name="keyword" content="html5, css, bootstrap, property, real-estate theme , bootstrap template">
  <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 商城的 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <link rel="stylesheet" href="./HotelUser/assets/css/astyle.css">
  <link rel="stylesheet" type="text/css" href="res/static/css/main.css">
  <link rel="stylesheet" type="text/css" href="res/layui/css/layui.css">
  <script type="text/javascript" src="res/layui/layui.js"></script>
<!--  -->

  <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800' rel='stylesheet' type='text/css'>

  <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
  <link rel="icon" href="favicon.ico" type="image/x-icon">

  <link rel="stylesheet" href="./HotelUser/assets/css/normalize.css">
  <link rel="stylesheet" href="./HotelUser/assets/css/font-awesome.min.css">
  <link rel="stylesheet" href="./HotelUser/assets/css/fontello.css">
  <link href="./HotelUser/assets/fonts/icon-7-stroke/css/pe-icon-7-stroke.css" rel="stylesheet">
  <link href="./HotelUser/assets/fonts/icon-7-stroke/css/helper.css" rel="stylesheet">
  <link href="./HotelUser/assets/css/animate.css" rel="stylesheet" media="screen">
  <link rel="stylesheet" href="./HotelUser/assets/css/bootstrap-select.min.css"> 
  <link rel="stylesheet" href="./HotelUser/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="./HotelUser/assets/css/icheck.min_all.css">
  <link rel="stylesheet" href="./HotelUser/assets/css/price-range.css">
  <link rel="stylesheet" href="./HotelUser/assets/css/owl.carousel.css">  
  <link rel="stylesheet" href="./HotelUser/assets/css/owl.theme.css">
  <link rel="stylesheet" href="./HotelUser/assets/css/owl.transitions.css">

  <link rel="stylesheet" href="./HotelUser/assets/css/responsive.css">
</head>
<body>
  <div class="header-connect">
    <div class="container">
        <div class="row">
            <div class="col-md-5 col-sm-8  col-xs-12">
                <div class="header-half header-call">
                    <p>
                        <span><i class="pe-7s-call"></i> +1 234 567 7890</span>
                        <span><i class="pe-7s-mail"></i> your@company.com</span>
                    </p>
                </div>
            </div>
            <div class="col-md-2 col-md-offset-5  col-sm-3 col-sm-offset-1  col-xs-12">
                <!-- <div class="header-half header-social">
                    <ul class="list-inline">
                        <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                        <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                        <li><a href="#"><i class="fa fa-vine"></i></a></li>
                        <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                        <li><a href="#"><i class="fa fa-dribbble"></i></a></li>
                        <li><a href="#"><i class="fa fa-instagram"></i></a></li>
                    </ul>
                </div> -->
            </div>
        </div>
    </div>
</div>       
<!--End top header -->

<nav class="navbar navbar-default ">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html"><img src="./HotelUser/assets/img/logo.png" alt=""></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse yamm" id="navigation">
            <div class="button navbar-right" id="login">
                <!-- <button class="navbar-btn nav-button wow bounceInRight login" onclick=" window.open('register.html')" data-wow-delay="0.4s">Login</button>
                <button class="navbar-btn nav-button wow fadeInRight" onclick=" window.open('submit-property.html')" data-wow-delay="0.5s">Submit</button> -->
            </div>
            <ul class="main-nav nav navbar-nav navbar-right">
                <li class="dropdown ymm-sw " data-wow-delay="0.1s">
                    <a href="./HotelUser-message&ordes.html" class="dropdown-toggle">个人中心</a>
                    <!-- <ul class="dropdown-menu navbar-nav">
                        <li>
                            <a href="index-2.html">Home Style 2</a>
                        </li>
                        <li>
                            <a href="index-3.html">Home Style 3</a>
                        </li>
                        <li>
                            <a href="index-4.html">Home Style 4</a>
                        </li>
                        <li>
                            <a href="index-5.html">Home Style 5</a>
                        </li>

                    </ul> -->
                </li>

                <li class="wow fadeInDown" data-wow-delay="0.1s"><a class="dropdown-toggle" href="./HotelUser-hotel.html">预订酒店</a></li>
                <li class="wow fadeInDown" data-wow-delay="0.1s"><a class="dropdown-toggle active" href="./HotelUser-shop.html">精品商城</a></li>
                <li class="dropdown yamm-fw" data-wow-delay="0.1s">
                    <a href="./HotelUser-food.html" class="dropdown-toggle">点餐堂食</a>
                   
                </li>

                <!-- <li class="wow fadeInDown" data-wow-delay="0.4s"><a href="contact.html">尊享服务</a></li> -->
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<!-- End of nav bar -->

<div class="page-head"> 
    <div class="container">
        <div class="row">
            <div class="page-head-content">
                <h1 class="page-title">凤嘉昶客栈</h1>               
            </div>
        </div>
    </div>
</div>
 

<div class="content content-nav-base shopcart-content">
    <div class="main-nav">
      <div class="inner-cont0">
        <div class="inner-cont1 w1200">
          <div class="inner-cont2">
            <a href="#" class="active">购物车</a>
            <!-- <a href="buytoday.html">今日团购</a>
            <a href="information.html">母婴资讯</a>
            <a href="about.html">关于我们</a> -->
          </div>
        </div>
      </div>
    </div>
    <!-- <div class="banner-bg w1200">
      <h3>夏季清仓</h3>
      <p>宝宝被子、宝宝衣服3折起</p>
    </div> -->
    <div class="cart w1200" id="all">
      <div class="cart-table-th">
        <div class="th th-chk">
          <div class="select-all">
            <div class="cart-checkbox">
              <input class="check-all check" id="allCheckked" type="checkbox" value="true">
            </div>
          <label>&nbsp;&nbsp;全选</label>
          </div>
        </div>
        <div class="th th-item">
          <div class="th-inner">
            商品
          </div>
        </div>
        <div class="th th-price">
          <div class="th-inner">
            单价
          </div>
        </div>
        <div class="th th-amount">
          <div class="th-inner">
            数量
          </div>
        </div>
        <div class="th th-sum">
          <div class="th-inner">
            小计
          </div>
        </div>
        <div class="th th-op">
          <div class="th-inner">
            操作
          </div>
        </div>  
      </div>
      <div class="OrderList">
        <div class="order-content" id="list-cont">
          <!-- <ul class="item-content layui-clear">
            <li class="th th-chk">
              <div class="select-all">
                <div class="cart-checkbox">
                  <input class="CheckBoxShop check" id="" type="checkbox" num="all" name="select-all" value="true">
                </div>
              </div>
            </li>
            <li class="th th-item">
              <div class="item-cont">
                <a href="javascript:;"><img src="res/static/img/paging_img1.jpg" alt=""></a>
                <div class="text">
                  <div class="title">宝宝T恤棉质小衫</div>
                  <p><span>粉色</span>  <span>130</span>cm</p>
                </div>
              </div>
            </li>
            <li class="th th-price">
              <span class="th-su">189.00</span>
            </li>
            <li class="th th-amount">
              <div class="box-btn layui-clear">
                <div class="less layui-btn">-</div>
                <input class="Quantity-input" type="" name="" value="1" disabled="disabled">
                <div class="add layui-btn">+</div>
              </div>
            </li>
            <li class="th th-sum">
              <span class="sum">189.00</span>
            </li>
            <li class="th th-op">
              <span class="dele-btn">删除</span>
            </li>
          </ul>
          <ul class="item-content layui-clear">
            <li class="th th-chk">
              <div class="select-all">
                <div class="cart-checkbox">
                  <input class="CheckBoxShop check" id="" type="checkbox" num="all" name="select-all" value="true">
                </div>
              </div>
            </li>
            <li class="th th-item">
              <div class="item-cont">
                <a href="javascript:;"><img src="res/static/img/paging_img2.jpg" alt=""></a>
                <div class="text">
                  <div class="title">宝宝T恤棉质小衫</div>
                  <p><span>粉色</span>  <span>130</span>cm</p>
                </div>
              </div>
            </li>
            <li class="th th-price">
              <span class="th-su">189.00</span>
            </li>
            <li class="th th-amount">
              <div class="box-btn layui-clear">
                <div class="less layui-btn">-</div>
                <input class="Quantity-input" type="" name="" value="1" disabled="disabled">
                <div class="add layui-btn">+</div>
              </div>
            </li>
            <li class="th th-sum">
              <span class="sum">189.00</span>
            </li>
            <li class="th th-op">
              <span class="dele-btn">删除</span>
            </li>
          </ul>
          <ul class="item-content layui-clear">
            <li class="th th-chk">
              <div class="select-all">
                <div class="cart-checkbox">
                  <input class="CheckBoxShop check" id="" type="checkbox" num="all" name="select-all" value="true">
                </div>
              </div>
            </li>
            <li class="th th-item">
              <div class="item-cont">
                <a href="javascript:;"><img src="res/static/img/paging_img3.jpg" alt=""></a>
                <div class="text">
                  <div class="title">宝宝T恤棉质小衫</div>
                  <p><span>粉色</span>  <span>130</span>cm</p>
                </div>
              </div>
            </li>
            <li class="th th-price">
              <span class="th-su">189.00</span>
            </li>
            <li class="th th-amount">
              <div class="box-btn layui-clear">
                <div class="less layui-btn">-</div>
                <input class="Quantity-input" type="" name="" value="1" disabled="disabled">
                <div class="add layui-btn">+</div>
              </div>
            </li>
            <li class="th th-sum">
              <span class="sum">189.00</span>
            </li>
            <li class="th th-op">
              <span class="dele-btn">删除</span>
            </li>
          </ul> -->
        </div>
      </div>


      <!-- 模版导入数据 -->
      <script type="text/html" id="demo">
        
        {{# layui.each(d.infoList,function(index,item){}}
          <ul class="item-content layui-clear">
            <li class="th th-chk">
              <div class="select-all">
                <div class="cart-checkbox">
                  <input class="CheckBoxShop check" id="" type="checkbox" num="all" name="select-all" value="true">
                </div>
              </div>
            </li>
            <li class="th th-item">
              <div class="item-cont">
                <a href="javascript:;"><img src="res/static/img/paging_img1.jpg" alt=""></a>
                <div class="text">
                  <div class="title">宝宝T恤棉质小衫</div>
                  <p><span>粉色</span>  <span>130</span>cm</p>
                </div>
              </div>
            </li>
            <li class="th th-price">
              <span class="th-su">189.00</span>
            </li>
            <li class="th th-amount">
              <div class="box-btn layui-clear">
                <div class="less layui-btn">-</div>
                <input class="Quantity-input" type="" name="" value="1" disabled="disabled">
                <div class="add layui-btn">+</div>
              </div>
            </li>
            <li class="th th-sum">
              <span class="sum">189.00</span>
            </li>
            <li class="th th-op">
              <span class="dele-btn">删除</span>
            </li>
          </ul>
        {{# });}}
      </script>


      <div class="FloatBarHolder layui-clear">
        <div class="th th-chk">
          <div class="select-all">
            <div class="cart-checkbox">
              <input class="check-all check" id="" name="select-all" type="checkbox"  value="true">
            </div>
            <label>&nbsp;&nbsp;已选<span class="Selected-pieces">0</span>件</label>
          </div>
        </div>
        <div class="th batch-deletion">
          <span class="batch-dele-btn" onclick="delall()">批量删除</span>
        </div>
        <div class="th Settlement">
          <button class="layui-btn" onclick="pay();">结算</button>
        </div>
        <div class="th total">
          <p>应付：<span class="pieces-total" id="paymoney">0</span></p>
        </div>
      </div>
    </div>
  </div>
  <script src="plugins/jquery/jquery.min.js"></script>
  <script>
    $(document).ready(function () {

if(location.href.indexOf("#reloaded")==-1){
   location.href=location.href+"#reloaded";
   location.reload();
}
})
var user=JSON.parse(localStorage.getItem('nowuser'))
  console.log("user=",user)
if(user==null){
  alert("请登录")
  window.location.href='./index.html'
}
else{
  var l=''

  l+="<button class='navbar-btn nav-button wow fadeInRight' onclick='bye();'>退出</button>"
  document.getElementById('login').innerHTML=l;
}
function bye(){
  alert("退出咯")
  window.location.href='./index.html',
  localStorage.clear();
}
    // location.reload();
     var carta; 
      var cartlist='';
      var lag=0;
    function pay(){
    
      var checkId=[];
		var chk=document.getElementsByTagName("input");
		for(var i=0,j=0,len=chk.length;i<len;i++){
			if(chk[i].type=="checkbox"){
			 if(chk[i].checked){ 
        if(chk[i].value!='true'){
          lag++;
			// alert(chk[i].value+"被选中了"); 
			checkId[j]=chk[i].value;
      if(lag>1){
        cartlist+=','
      }
      cartlist+=chk[i].value;}
			j++;
			}
		}
	} 
			if(checkId.length>0){
				// 
        console.log(checkId);
        console.log(cartlist);
				localStorage.setItem('cartlist',cartlist)
        var paym=$('#paymoney').val()
        // alert(paym)
        // localStorage.setItem('paymoney',paym)
        window.location.href="HotelUser-shop-pay.html";
			}
      
      // localStorage.setItem('paydata',localStorage.getItem('mycart'))
      

    }
    function delall() {
		alert("确定么？删了可就没了！！！") 
	var checkId=[];
		var chk=document.getElementsByTagName("input");
		for(var i=0,j=0,len=chk.length;i<len;i++){
			if(chk[i].type=="checkbox"){
			 if(chk[i].checked){ 
        if(chk[i].value!='true')
			// alert(chk[i].value+"被选中了"); 
			checkId[j]=chk[i].value;
      delone2(chk[i].value)
			j++;
			}
		}
	} 
			if(checkId.length>0){
				// window.location.href="MessageServlet_WJS?checkId="+checkId;
        console.log(checkId)
				
			}
			else{
				alert("未选中！！！");
			}
}

  // if(user==null){
  //   alert("请登录")
  //   localStorage.removeItem('nowuser')
  //   window.location.href='./index.html'

  // }
  function jumptodetailsgood(id){
    $.ajax({
            url: "https://douzi.wiki:7000/GROW/api/goods/"+id,
          type: "get",
          dataType: "json",
          contentType: "application/json",
          // async:false,
          success: function (res) {
            localStorage.removeItem('productdetailsdata')
            localStorage.setItem('productdetailsdata',JSON.stringify(res.data))
            console.log(res.data)
            // alert(124)
            window.location.href = './HotelUser-shop-details.html?'+'id='+id
          },
          error: function (res) {
            alert("访问失败")
        },
      });
  }
  function jumptodetailsfood(id){
    $.ajax({
            url: "https://douzi.wiki:7000/GROW/api/goods/"+id,
          type: "get",
          dataType: "json",
          contentType: "application/json",
          // async:false,
          success: function (res) {

            localStorage.setItem('fooddetailsdata',JSON.stringify(res.data))
            console.log(res.data)
            window.location.href = './HotelUser-shop-details.html?'+'id='+res.data.id
          },
          error: function (res) {
            alert("访问失败")
        },
      });
  }
 
      $.ajax({
            url: "https://douzi.wiki:7000/GROW/api/cart/checkCartOrder",
          type: "get",
          dataType: "json",
          contentType: "application/json",
          // async:false,
          success: function (res) {
            // alert(1234)
            console.log(res)
            console.log(res.msg)
              var h1=''
            if(res.msg==="成功"){       
              console.log(res.data)
              carta=res.data;

           localStorage.setItem('mycart',JSON.stringify(res.data))  
             
            }
            //  document.getElementById('list-cont').innerHTML=h1
          },
        
          error: function (res) {
            alert("访问失败")
        },

          });
var mycart=JSON.parse(localStorage.getItem('mycart'))
// 
var h1=''
var flag=1;
var count=0;
    $.each(mycart,function(i,n){
      if(user.id==n.t_user_id){
        console.log("gname" in n)
        console.log(n.hasOwnProperty('gname'))
        if("gname" in n){
          count++;
      h1+="<ul class='item-content layui-clear'>"+
    "<li class='th th-chk'>"+
      "<div class='select-all'>"+
        "<div class='cart-checkbox'>"+
          "<input class='CheckBoxShop check' id='xuanze' type='checkbox' num='all' name='select-all' value='"+n.id+"'>"+
        "</div>"+
      "</div>"+
    "</li>"+
    "<li class='th th-item'>"+
      "<div class='item-cont'>"+
        "<a href='javascript:jumptodetailsgood("+n.gid+");'><img src='res/static/img/paging_img1.jpg' alt=''></a>"+
        "<div class='text'>"+
          "<div class='title'>"+n.gname+"</div>"+
          // "<p><span>粉色</span><span>130</span>cm</p>"+
        "</div>"+
      "</div>"+
    "</li>"+
    "<li class='th th-price'>"+
      "<span class='th-su'>"+n.gcash_price+"</span>"+
    "</li>"+
    "<li class='th th-amount'>"+
      "<div class='box-btn layui-clear'>"+
        "<div class='less layui-btn'  onclick='subnumber("+n.id+");'>-</div>"+
        "<input class='Quantity-input' id='nownumber"+n.id+"' type='' name='' value='"+n.number+"' disabled='disabled'>"+
        "<div class='add layui-btn' onclick='addnumber("+n.id+");'>+</div>"+
      "</div>"+
    "</li>"+
    "<li class='th th-sum'>"+
      "<span class='sum'>"+(n.number*n.gcash_price)+"</span>"+
    "</li>"+
    "<li class='th th-op'>"+
      "<span class='dele-btn' onclick='delone("+n.id+");'>删除</span>"+
    "</li>"+
  "</ul>" 
    }


  }  
  else  if("fname" in n){
    count++;
      h1+="<ul class='item-content layui-clear'>"+
    "<li class='th th-chk'>"+
      "<div class='select-all'>"+
        "<div class='cart-checkbox'>"+
          "<input class='CheckBoxShop check' id='' type='checkbox' num='all' name='select-all' value='"+n.id+"'>"+
        "</div>"+
      "</div>"+
    "</li>"+
    "<li class='th th-item'>"+
      "<div class='item-cont'>"+
        "<a href='javascript:jumptodetails("+n.id+");;'><img src='res/static/img/paging_img1.jpg' alt=''></a>"+
        "<div class='text'>"+
          "<div class='title'>"+n.fname+"</div>"+
          // "<p><span>粉色</span><span>130</span>cm</p>"+
        "</div>"+
      "</div>"+
    "</li>"+
    "<li class='th th-price'>"+
      "<span class='th-su'>"+n.fcash_price+"</span>"+
    "</li>"+
    "<li class='th th-amount'>"+
      "<div class='box-btn layui-clear'>"+
        "<div class='less layui-btn'  onclick='subnumber("+n.id+");'>-</div>"+
        "<input class='Quantity-input' id='nownumber"+n.id+"' type='' name='' value='"+n.number+"' disabled='disabled'>"+
        "<div class='add layui-btn' onclick='addnumber("+n.id+");'>+</div>"+
      "</div>"+
    "</li>"+
    "<li class='th th-sum'>"+
      "<span class='sum'>"+(n.number*n.fcash_price)+"</span>"+
    "</li>"+
    "<li class='th th-op'>"+
      "<span class='dele-btn' onclick='delone("+n.id+");'>删除</span>"+
    "</li>"+
  "</ul>" 
    // }

  }   

    
 });  
 if (count==0){
    h1="购物车为空哦！快去商城添加商品吧！"
    flag=-1
    }
 if(flag==-1){
    document.getElementById('all').innerHTML=h1
 }
      

  document.getElementById('list-cont').innerHTML=h1;
      
  </script>
<script type="text/javascript">
  //购物车修改‘’】
      function addnumber(gid){
        localStorage.removeItem('mycart')

        var cc=parseInt($('#nownumber'+gid).val());
        // alert(cc)
        cc+=1;
        // alert(cc)
          $.ajax({
          url: "https://douzi.wiki:7000/GROW/api/cart",
          type: "PUT",
          dataType: "json",
          contentType: "application/json",
          data:JSON.stringify({
            id:gid,
            number:cc
          }),
          // async:false,
          success: function (res) {
            console.log("修改成功")
 
          },
        
          error: function (res) {
            console.log("修改失败")
        },

          });

          $.ajax({
            url: "https://douzi.wiki:7000/GROW/api/cart/checkCartOrder",
          type: "get",
          dataType: "json",
          contentType: "application/json",
          // async:false,
          success: function (res) {
            // alert(1234)
            console.log(res)
            console.log(res.msg)
              var h1=''
            if(res.msg==="成功"){       
              console.log(res.data)
           localStorage.setItem('mycart',JSON.stringify(res.data))  
             
            }
            //  document.getElementById('list-cont').innerHTML=h1
          },
        
          error: function (res) {
            alert("访问失败")
        },

          });
      }
function subnumber(gid){
  localStorage.removeItem('mycart')
let ca=parseInt($('#nownumber'+gid).val());
// alert(ca)
if(ca>1)
  ca-=1;
// alert(cc)

$.ajax({
  url: "https://douzi.wiki:7000/GROW/api/cart",
  type: "PUT",
  dataType: "json",
  contentType: "application/json",
  data:JSON.stringify({
    id:gid,
    number:ca
  }),
  // async:false,
  success: function (res) {
    console.log("修改成功")
  },

  error: function (res) {
    console.log("修改失败")
},

  });



  $.ajax({
            url: "https://douzi.wiki:7000/GROW/api/cart/checkCartOrder",
          type: "get",
          dataType: "json",
          contentType: "application/json",
          // async:false,
          success: function (res) {
            // alert(1234)
            console.log(res)
            console.log(res.msg)
              var h1=''
            if(res.msg==="成功"){       
              console.log(res.data)
           localStorage.setItem('mycart',JSON.stringify(res.data))  
             
            }
            //  document.getElementById('list-cont').innerHTML=h1
          },
        
          error: function (res) {
            alert("访问失败")
        },

          });
}


  layui.config({
    base: 'res/static/js/util/' //你存放新模块的目录，注意，不是layui的模块目录
  }).use(['mm','jquery','element','car'],function(){
    var mm = layui.mm,$ = layui.$,element = layui.element,car = layui.car;
    
    // // 模版导入数据
    var html = demo.innerHTML,
    listCont = document.getElementById('list-cont');
    mm.request({
      url: '../json/shopcart.json',
      success : function(res){
        listCont.innerHTML = mm.renderHtml(html,res)
        element.render();
        car.init()
      },
      error: function(res){
        console.log(res);
      }
    })
    
    car.init()


});
</script>

<script>
  function delone(id){
    $.ajax({
          url: "https://douzi.wiki:7000/GROW/api/cart/del",
          type: "get",
          dataType: "json",
          contentType: "application/json",
          data:{
            id:id
          },
          // async:false,
          success: function (res) {
            alert("删除成功")
          },
        
          error: function (res) {
            alert("访问失败")
        },

          });

  }
  function delone2(id){
    $.ajax({
          url: "https://douzi.wiki:7000/GROW/api/cart/del",
          type: "get",
          dataType: "json",
          contentType: "application/json",
          data:{
            id:id
          },
          // async:false,
          success: function (res) {
            // alert("删除成功")
          },
        
          error: function (res) {
            alert("访问失败")
        },

          });

  }
</script>
</body>
</html>